<?php
/**
 *
 */
class Sx_useredit extends CI_Controller {

	private $userID;
	private $postMobiKey;
	private $postSessionId;
	private $userArr;
	private $acction;

	public function index() {
		$this -> postMobiKey = $this -> input -> post('mobikey');
		$this -> postSessionId = $this -> input -> post('sessionid');
		$this -> userArr = $this -> sx_useropen_mod -> user_con($this -> postMobiKey, $this -> postSessionId, TRUE);
		if (!$this -> userArr) {
			print($this -> fengchaoclass -> showhckmsg("-1", NULL, $this -> lang -> line('hck_friend_out'), TRUE));
			exit ;
		}

		$this -> acction = $this -> input -> post('acction');
		switch ($this->acction) {
			case 'userinfo' :
				$this -> show_user();
				break;
			default :
				break;
		}
	}

	private function show_user($id = NULL) {
		!isset($id) || empty($id) ? $this -> userID = $this -> userArr['userid'] : $this -> userID = $id;
		$p = $this -> sx_useropen_mod -> userall("$this->userID", "", "");
		print(json_encode($p));
	}

}
?>